{% extends "ProjetUserBundle::layout.html.twig" %}

{% block title %}
	Accueil User- {{ parent() }}
{% endblock %}

{% block User_body %}

<h1>User list</h1>

<table class="records_list">
    <thead>
        <tr>
            <th>Username</th>
            <th>Usernamecanonical</th>
            <th>Email</th>
            <th>Emailcanonical</th>
            <th>Enabled</th>
            <th>Salt</th>
            <th>Password</th>
            <th>Lastlogin</th>
            <th>Locked</th>
            <th>Expired</th>
            <th>Expiresat</th>
            <th>Confirmationtoken</th>
            <th>Passwordrequestedat</th>
            <th>Roles</th>
            <th>Credentialsexpired</th>
            <th>Credentialsexpireat</th>
            <th>Id</th>
            <th>Actions</th>
        </tr>
    </thead>
    <tbody>
    {% for entity in entities %}
        <tr>
            <td><a href="{{ path('user_show', { 'id': entity.id }) }}">{{ entity.username }}</a></td>
            <td>{{ entity.usernameCanonical }}</td>
            <td>{{ entity.email }}</td>
            <td>{{ entity.emailCanonical }}</td>
            <td>{{ entity.enabled }}</td>
            <td>{{ entity.salt }}</td>
            <td>{{ entity.password }}</td>
            <td>{% if entity.lastLogin %}{{ entity.lastLogin|date('Y-m-d H:i:s') }}{% endif%}</td>
            <td>{{ entity.locked }}</td>
            <td>{{ entity.expired }}</td>
            <td>{% if entity.expiresAt %}{{ entity.expiresAt|date('Y-m-d H:i:s') }}{% endif%}</td>
            <td>{{ entity.confirmationToken }}</td>
            <td>{% if entity.passwordRequestedAt %}{{ entity.passwordRequestedAt|date('Y-m-d H:i:s') }}{% endif%}</td>
            <td>{{ entity.roles }}</td>
            <td>{{ entity.credentialsExpired }}</td>
            <td>{% if entity.credentialsExpireAt %}{{ entity.credentialsExpireAt|date('Y-m-d H:i:s') }}{% endif%}</td>
            <td>{{ entity.id }}</td>
            <td>
                <ul>
                    <li>
                        <a href="{{ path('user_show', { 'id': entity.id }) }}">show</a>
                    </li>
                    <li>
                        <a href="{{ path('user_edit', { 'id': entity.id }) }}">edit</a>
                    </li>
                </ul>
            </td>
        </tr>
    {% endfor %}
    </tbody>
</table>

<ul>
    <li>
        <a href="{{ path('user_new') }}">
            Create a new entry
        </a>
    </li>
</ul>
{% endblock %}